﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp.TestFunc.Models
{
    [Table("blogs")]
    public class Blog
    {
        [Key]
        [Column("BlogId")]
        public int BlogId { get; set; }

        [Column("Url")]
        public string? Url { get; set; }

        [Column("Rating")]
        public int Rating { get; set; }

        // 导航属性
        public ICollection<Post> Posts { get; set; } = new List<Post>();
    }
}
